package com.crois.barrier.admin.mapstruct;

import com.crois.barrier.admin.dto.ApiRouteGroupDto;
import com.crois.barrier.admin.entity.ApiRouteGroup;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
* barrier api组表实体互转
*
* @author Hou Ze Yu
* @version 1.0
* @date 2021-10-25 11:58:24
**/
@Mapper
public interface ApiRouteGroupDtoEntityMapper {

    ApiRouteGroupDtoEntityMapper INSTANCE = Mappers.getMapper(ApiRouteGroupDtoEntityMapper.class);

    /**
     * barrier api组表 Dto
     * @param apiRouteGroup barrier api组表实体
     * @return barrier api组表Dto
     */
    ApiRouteGroupDto toApiRouteGroupDto(ApiRouteGroup apiRouteGroup);

    /**
     * barrier api组表dto转换成实体
     * @param apiRouteGroupDto barrier api组表Dto
     * @return barrier api组表实体
     */
    ApiRouteGroup toApiRouteGroupEntity(ApiRouteGroupDto apiRouteGroupDto);

    /**
     * barrier api组表实体集合转换成dto集合
     * @param apiRouteGroupList barrier api组表实体集合
     * @return barrier api组表dto集合
     */
    List<ApiRouteGroupDto> toApiRouteGroupDtoList(List<ApiRouteGroup> apiRouteGroupList);
}
